package com.iweb.newa202104.Mapper;

import com.iweb.newa202104.dto.DurationOutputDTO;
import com.iweb.newa202104.entity.DurationEntity;
import com.iweb.newa202104.entity.QuestionEntity;
import com.iweb.newa202104.entity.ResourceEntity;
import com.iweb.newa202104.entity.UserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

/**
 * @Author: LGZ
 * @Date: 2021/5/12 16:39
 * @Description:
 */
@Component
@Mapper
public interface DurationMapper {

    /**
     * TODO
     * @Description 获取某个分类不同人的总时长，降序，limit 20
     * @Author lgz
     * @Date 2021/5/12 16:42
     * @param resourceEntity :
     * @return : com.iweb.newa202104.dto.DurationOutputDTO[]
     */
    DurationOutputDTO[] getAllByCategory(ResourceEntity resourceEntity);

    /**
     * TODO
     * @Description 获取某个资源不同人的时长，降序，limit 20
     * @Author lgz
     * @Date 2021/5/12 16:42
     * @param resourceEntity :
     * @return : com.iweb.newa202104.dto.DurationOutputDTO[]
     */
    DurationOutputDTO[] getAllByResource(ResourceEntity resourceEntity);

    /**
     * TODO
     * @Description 获取不同人的总时长，降序 limit 20
     * @Author lgz
     * @Date 2021/5/12 16:42

     * @return : com.iweb.newa202104.dto.DurationOutputDTO[]
     */
    DurationOutputDTO[] getAll();

    /**
     * @Description 获取某个人的总时长
     * @author Tansty
     * @date 2021/5/13 10:00
     * @return com.iweb.newa202104.dto.DurationOutputDTO[]
     */
    DurationOutputDTO[] getAllByUser(UserEntity userEntity);

    /**
     * @Description  获取某个人的某个资源的时长
     * @author Tansty
     * @date 2021/5/13 10:35
     * @param durationEntity
     * @return com.iweb.newa202104.dto.DurationOutputDTO
     */
    DurationOutputDTO[] getUserResource(DurationEntity durationEntity);

    /**
     * @Description 获取某个人的某个分类的总时长
     * @author Tansty
     * @date 2021/5/13 16:58
     * @param questionEntity
     * @return com.iweb.newa202104.dto.DurationOutputDTO[]
     */
    DurationOutputDTO[] getUserCategory(QuestionEntity questionEntity);
}
